import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '../views/HomePage.vue'
import GameDetail from '../views/GameDetail.vue'
import GameDownload from '../views/GameDownload.vue'
import GameBackend from '../views/GameBackend.vue'
import HomeCategory from '../views/HomeCategory.vue'
import GameCdk from '../views/GameCdk.vue'
import HomeApp from '../views/HomeApp.vue'
import HomeMine from '../views/HomeMine.vue'

const routes = [
  {
    path: '/',
    name: 'HomePage',
    component: HomePage
  },
  {
    path: '/detail',
    name: 'GameDetail',
    component: GameDetail
  },
  {
    path: '/download',
    name: 'GameDownload',
    component: GameDownload
  },
  {
    path: '/backend',
    name: 'GameBackend',
    component: GameBackend
  },
  {
    path: '/category',
    name: 'HomeCategory',
    component: HomeCategory
  },
  {
    path: '/cdk',
    name: 'GameCdk',
    component: GameCdk
  },
  {
    path: '/app',
    name: 'HomeApp',
    component: HomeApp
  },
  {
    path: '/mine',
    name: 'HomeMine',
    component: HomeMine
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/'
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 